const Service = require("../../services");

module.exports = {
  name: "doctor_info",

  async get_doctor(ctx) {
    ctx.body = await Service.service.doctor_info.get_doctor(ctx.query, false);
  },

  async get_doctors(ctx) {
    ctx.body = await Service.service.doctor_info.get_doctor(ctx.query, true);
  },

  async add_doctors(ctx) {
    ctx.body = await Service.service.doctor_info.join(ctx.request.body);
  },

  async update_pb(ctx) {
    ctx.body = await Service.service.doctor_info.update_pb(ctx.request.body);
  },

  async add_doctor_valid(ctx) {
    ctx.body = await Service.service.doctor_info.add_doctor_valid(
      ctx.request.body
    );
  },

  async update_info(ctx) {
    ctx.body = await Service.service.doctor_info.update_info(ctx.request.body);
  },

  async add_valid_faild(ctx) {
    ctx.body = await Service.service.valid_faild.add(ctx.request.body);
  },

  async get_faild_reason(ctx) {
    ctx.body = await Service.service.valid_faild.get_reason(ctx.query);
  },
};
